package com.qf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import lombok.Data;


/**
 * @author KING
 * @ClassName: com.qf.entity.Order
 * @Description: 该类的功能描述
 * @date: 2021/10/29 9:47
 */


/**
 * 订单表
 */
@Data
@TableName(value = "t_order")
public class Order {
    /**
     * 订单表ID
     */
    @TableId(value = "order_id", type = IdType.INPUT)
    private Long orderId;

    /**
     * 店铺id
     */
    @TableField(value = "store_id")
    private Long storeId;

    /**
     * 订单编号
     */
    @TableField(value = "order_no")
    private String orderNo;

    /**
     * 收货人姓名
     */
    @TableField(value = "receiving_name")
    private String receivingName;

    /**
     * 收货人电话
     */
    @TableField(value = "receiving_phone")
    private String receivingPhone;

    /**
     * 省份/直辖市
     */
    @TableField(value = "receiver_province")
    private String receiverProvince;

    /**
     * 城市
     */
    @TableField(value = "receiver_city")
    private String receiverCity;

    /**
     * 区
     */
    @TableField(value = "receiver_region")
    private String receiverRegion;

    /**
     * 详细地址
     */
    @TableField(value = "receiver_detail_address")
    private String receiverDetailAddress;

    /**
     * 下单会员ID
     */
    @TableField(value = "member_id")
    private Long memberId;

    /**
     * 普通订单1，预售订单2，拼团订单3
     */
    @TableField(value = "order_type")
    private Integer orderType;

    /**
     * 待付款1，代发货2，已发货3，已完成4，已关闭5
     */
    @TableField(value = "order_status")
    private Integer orderStatus;

    /**
     * 商品总价
     */
    @TableField(value = "total_amount")
    private BigDecimal totalAmount;

    /**
     * 商品实际付款金额
     */
    @TableField(value = "pay_amount")
    private BigDecimal payAmount;

    /**
     * 运费金额
     */
    @TableField(value = "freight_amount")
    private BigDecimal freightAmount;

    /**
     * 促销优惠金额
     */
    @TableField(value = "promotion_amount")
    private BigDecimal promotionAmount;

    /**
     * 积分抵扣金额
     */
    @TableField(value = "integration_amount")
    private BigDecimal integrationAmount;

    /**
     * 下单时使用的积分数
     */
    @TableField(value = "use_integration")
    private Integer useIntegration;

    /**
     * 优惠券抵扣金额
     */
    @TableField(value = "coupon_amount")
    private BigDecimal couponAmount;

    /**
     * 优惠卷码
     */
    @TableField(value = "coupon_id")
    private String couponId;

    /**
     * 支付方式：0->未支付；1->支付宝；2->微信
     */
    @TableField(value = "pay_type")
    private Integer payType;

    /**
     * 物流单号
     */
    @TableField(value = "delivery_sn")
    private String deliverySn;

    /**
     * 订单备注
     */
    @TableField(value = "note")
    private String note;

    /**
     * 支付时间
     */
    @TableField(value = "payment_time")
    private Date paymentTime;

    /**
     * 发货时间
     */
    @TableField(value = "delivery_time")
    private Date deliveryTime;

    /**
     * 确认收货时间
     */
    @TableField(value = "receive_time")
    private Date receiveTime;

    /**
     * 评价时间
     */
    @TableField(value = "comment_time")
    private Date commentTime;

    /**
     * 修改时间
     */
    @TableField(value = "modify_time")
    private Date modifyTime;

    private List<OrderItem> orderItemList;

    private String productName;

    public static final String COL_ORDER_ID = "order_id";

    public static final String COL_STORE_ID = "store_id";

    public static final String COL_ORDER_NO = "order_no";

    public static final String COL_RECEIVING_NAME = "receiving_name";

    public static final String COL_RECEIVING_PHONE = "receiving_phone";

    public static final String COL_RECEIVER_PROVINCE = "receiver_province";

    public static final String COL_RECEIVER_CITY = "receiver_city";

    public static final String COL_RECEIVER_REGION = "receiver_region";

    public static final String COL_RECEIVER_DETAIL_ADDRESS = "receiver_detail_address";

    public static final String COL_MEMBER_ID = "member_id";

    public static final String COL_ORDER_TYPE = "order_type";

    public static final String COL_ORDER_STATUS = "order_status";

    public static final String COL_TOTAL_AMOUNT = "total_amount";

    public static final String COL_PAY_AMOUNT = "pay_amount";

    public static final String COL_FREIGHT_AMOUNT = "freight_amount";

    public static final String COL_PROMOTION_AMOUNT = "promotion_amount";

    public static final String COL_INTEGRATION_AMOUNT = "integration_amount";

    public static final String COL_USE_INTEGRATION = "use_integration";

    public static final String COL_COUPON_AMOUNT = "coupon_amount";

    public static final String COL_COUPON_ID = "coupon_id";

    public static final String COL_PAY_TYPE = "pay_type";

    public static final String COL_DELIVERY_SN = "delivery_sn";

    public static final String COL_NOTE = "note";

    public static final String COL_PAYMENT_TIME = "payment_time";

    public static final String COL_DELIVERY_TIME = "delivery_time";

    public static final String COL_RECEIVE_TIME = "receive_time";

    public static final String COL_COMMENT_TIME = "comment_time";

    public static final String COL_MODIFY_TIME = "modify_time";
}